package com.rn.gypsophila.redis.queue.blocking;

import com.rn.gypsophila.redis.basic.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Description：Redis消息生产者
 *
 * @author rannuo
 * @date 2020/5/12
 */
@Slf4j
@Component
public class RedisMessageProducer {

    @Autowired
    private RedisUtils redisUtils;

    public void send(String message) {
        redisUtils.leftPush("test_msg", message);
        log.info("Redis消息生产者发送数据：{}", message);
    }

}
